import java.util.Scanner;

/**
 * @author yu
 * @date 2025年05月13日 10:21
 */
public class HJ1 {
    public static int getLength(String[] words){
        return words[words.length-1].length();
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();

        String[] words = line.split(" ");
        int res = getLength(words);
        System.out.println(res);
    }
    /*public static void main(String[] args) {
        String input = "hello world";
        String[] words1 = input.split(" ");   // ["hello", "world"]
        String[] words2 = input.split("\\s+"); // ["hello", "world"]
        System.out.println("words1.length = " + words1.length);//2
        System.out.println("words2.length = " + words2.length); //2
    }*/
}
